package bookstudytest.threadtest.Executor;

import bookstudytest.threadtest.implement.ThreadByRunnable;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author heng.li
 * FixedThreadPool 所有任务只能使用固定大小的线程
 */
public class FixedThreadPoolTest {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        executorService.submit(new ThreadByRunnable());
        executorService.shutdown();
    }
}
